﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AutoStockTrade.Model
{
    [Serializable]
    public class StockModel : ModelBase
    {
        private DateTime _time;
        public DateTime Time
        {
            get
            {
                return _time;
            }
            set
            {
                _time = value;
                NotifyPropertyChanged("Time");
            }
        }

        private Operation _operation;
        public Operation Operation
        {
            get
            {
                return _operation;
            }
            set
            {
                _operation = value;
                NotifyPropertyChanged("Operation");
            }
        }

        private float _price;
        public float Price
        {
            get
            {
                return _price;
            }
            set
            {
                _price = value;
                NotifyPropertyChanged("Price");
            }
        }

        private int _quantity;
        public int Quantity
        {
            get
            {
                return _quantity;
            }
            set
            {
                _quantity = value;
                NotifyPropertyChanged("Quantity");
            }
        }
    }

    /// <summary>
    /// 操作方式枚举
    /// </summary>
    public enum Operation
    {
        /// <summary>
        /// 买入
        /// </summary>
        Buy = 0,
        /// <summary>
        /// 卖出
        /// </summary>
        Sell
    }
}
